* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    overflow: hidden;
}

.scroll-container {
    height: 100vh;
    position: relative;
}

.item {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    transition: 1s ease-in-out;
}

.item img {
    position: absolute;
    width: 100vw;
    height: 100vh;
    object-fit: cover;
    transition: 1s;
}

.item.prev,
.item.next {
    z-index: 1;
    height: 0;
}

.item.prev img {
    top: 0;
    left: 0;
    transform: translateY(-10%);
}

.item.next {
    bottom: 0;
}

.item.next img {
    bottom: 0;
    left: 0;
    transform: translateY(10%);
}

.scroll-up .item.prev {
    height: 100%;
}

.scroll-up .item.prev img {
    transform: translateY(0);
}

.scroll-up .item.current img {
    transform: translateY(10%);
}

.scroll-down .item.next {
    height: 100%;
}

.scroll-down .item.next img {
    transform: translateY(0);
}

.scroll-down .item.current img {
    transform: translateY(-10%);
}